<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link type="text/css" rel="stylesheet" th:href="@{/static/js/plugin/bootstrap/css/bootstrap.min.css}" href="static/js/plugin/bootstrap/css/bootstrap.min.css"/>
<link rel="stylesheet" type="text/css" th:href="@{/static/css/font.awesome/css/font-awesome.min.css}" href="static/css/font.awesome/css/font-awesome.min.css"/>
<link rel="stylesheet" type="text/css" th:href="@{/static/css/common.css}" href="static/css/common.css" />
<link rel="stylesheet" type="text/css" th:href="@{/static/js/plugin/zTree/css/metroStyle/metroStyle.css}" />
<title>菜单树</title>
</head>
<body>
<div class="container-fluid">
	<ul id="menuTree" class="ztree"></ul>
</div>
</body>
<script type="text/javascript" th:src="@{/static/js/plugin/jquery/jquery.min.js}" src="static/js/plugin/jquery/jquery.min.js"></script>
<script type="text/javascript" th:src="@{/static/js/plugin/bootstrap/js/bootstrap.min.js}" src="static/js/plugin/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" th:src="@{/static/js/plugin/layer/layer.js}" src="static/js/plugin/layer/layer.js"></script>
<script type="text/javascript" th:src="@{/static/js/plugin/zTree/js/jquery.ztree.core.min.js}"></script>
<script type="text/javascript" th:src="@{/static/js/plugin/zTree/js/jquery.ztree.excheck.min.js}"></script>
<script type="text/javascript">
$(function() {
	var setting = {
		async:{
           enable:true,
           url:'children',
           type:'get',
           autoParam:["parentId"]
        },
        data: {
            simpleData: {
                enable: true
            }
        },
        callback:{
        	onClick: function(event, treeId, treeNode) {
        		window.treeNode = treeNode; //用于传递值
        	}
        }
	}
	
	$.fn.zTree.init($("#menuTree"), setting);
	
});
</script>
</html>